﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Eatime.Entitys
{
    class SellerCat : INotifyPropertyChanged
    {
        private int _parentSellerCatId = 0;
        public int Parent_SellerCatId
        {
            get { return _parentSellerCatId; }
            set
            {
                if (value != _parentSellerCatId)
                {
                    _parentSellerCatId = value;
                    NotifyPropertyChanged("Parent_SellerCatId");
                }
            }
        }

        private string _name;
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                if (value != _name)
                {
                    _name = value;
                    NotifyPropertyChanged("Name");
                }
            }
        }

        private int _sortOrder = 0;
        public int Sort_order
        {
            get { return _sortOrder; }
            set
            {
                if (value != _sortOrder)
                {
                    _sortOrder = value;
                    NotifyPropertyChanged("Sort_order");
                }
            }
        }

        private Boolean _isParent = false;
        public Boolean Is_parent
        {
            get { return _isParent; }
            set
            {
                if (value != _isParent)
                {
                    _isParent = value;
                    NotifyPropertyChanged("Is_parent");
                }
            }
        }

        private DateTime _created = DateTime.Now;
        public DateTime Created
        {
            get { return _created; }
            set
            {
                if (value != _created)
                {
                    _created = value;
                    NotifyPropertyChanged("Created");
                }
            }
        }

        private DateTime _modified = DateTime.Now;
        public DateTime Modified
        {
            get { return _modified; }
            set
            {
                if (value != _modified)
                {
                    _modified = value;
                    NotifyPropertyChanged("Modified");
                }
            }
        }

        private bool _isDeleted = false;
        public bool IsDeleted
        {
            get
            {
                return _isDeleted;
            }
            set
            {
                if (value != _isDeleted)
                {
                    _isDeleted = value;
                    NotifyPropertyChanged("IsDeleted");
                }
            }
        }

        private int _shopId = 0;
        public int ShopId
        {
            get { return _shopId; }
            set
            {
                if (value != _shopId)
                {
                    _shopId = value;
                    NotifyPropertyChanged("ShopId");
                }
            }
        }

        private string _deviceUniqueId;
        public string DeviceUniqueId
        {
            get { return _deviceUniqueId; }
            set
            {
                if (value != _deviceUniqueId)
                {
                    _deviceUniqueId = value;
                    NotifyPropertyChanged("DeviceUniqueId");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
    }
}
